/**
 * 生产BOM信息 api 封装
 *
 * @Author:    lmabbe
 * @Date:      2025-06-27 19:00:37
 * @Copyright  lmabbe
 */
import { getRequest, postRequest } from '/@/lib/axios';

export const bomInfoApi = {
  /**
   * 分页查询  @author  lmabbe
   */
  queryPage: (param) => {
    return postRequest('/bomInfo/queryPage', param);
  },

  /**
   * 增加  @author  lmabbe
   */
  add: (param) => {
    return postRequest('/bomInfo/add', param);
  },

  /**
   * 修改  @author  lmabbe
   */
  update: (param) => {
    return postRequest('/bomInfo/update', param);
  },

  /**
   * 删除  @author  lmabbe
   */
  delete: (id) => {
    return getRequest(`/bomInfo/delete/${id}`);
  },

  /**
   * 批量删除  @author  lmabbe
   */
  batchDelete: (idList) => {
    return postRequest('/bomInfo/batchDelete', idList);
  },

  audit: (bomId, isAudit) => {
    return postRequest(`/bomInfo/${bomId}/audit/${isAudit}`);
  },
};
